import { Avatar, Code, CreateDate, Digdit, Entity, Jsonb, PrimaryUuid, Unique, UpdateDate, Username } from "@sker/core";

@Entity({
    name: 'spider_user'
})
@Unique(['platform', 'username'])
export class SpiderUser {
    @PrimaryUuid()
    id!: number;

    @Code()
    platform!: string;

    @Username({
        default: ''
    })
    username!: string;

    @Avatar({ nullable: true, default: '' })
    avatar: string;

    @Username({
        default: ''
    })
    user_id!: string;

    @Digdit()
    status!: number;

    @Jsonb()
    cookies!: any;

    @CreateDate()
    create_date!: Date;

    @UpdateDate()
    update_date!: Date;
}